<!DOCTYPE html>
<html lang='zh-CN'>

<head>
  <meta name="generator" content="Hexo 6.3.0">
  <meta name="hexo-theme" content="https://github.com/xaoxuu/hexo-theme-stellar/tree/1.19.0">
  <meta charset="utf-8">
  

  <meta http-equiv='x-dns-prefetch-control' content='on' />
  <link rel='dns-prefetch' href='https://gcore.jsdelivr.net'>
  <link rel="preconnect" href="https://gcore.jsdelivr.net" crossorigin>
  <link rel='dns-prefetch' href='//unpkg.com'>

  <meta name="renderer" content="webkit">
  <meta name="force-rendering" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  <meta name="HandheldFriendly" content="True" >
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="theme-color" content="#f8f8f8">
  
  <title>读《琅嬛文集》录 - 愔颂</title>

  
    <meta name="description" content="近来读张岱《琅嬛文集》，遇见许多赏心悦目的文字，摘录此篇分享给大家。">
<meta property="og:type" content="article">
<meta property="og:title" content="读《琅嬛文集》录">
<meta property="og:url" content="https://farhills.gitee.io/2022/05/12/%E8%AF%BB%E3%80%8A%E7%90%85%E5%AC%9B%E6%96%87%E9%9B%86%E3%80%8B%E5%BD%95/index.html">
<meta property="og:site_name" content="愔颂">
<meta property="og:description" content="近来读张岱《琅嬛文集》，遇见许多赏心悦目的文字，摘录此篇分享给大家。">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2022-05-12T12:35:14.000Z">
<meta property="article:modified_time" content="2023-10-28T11:42:49.082Z">
<meta property="article:author" content="远岫">
<meta name="twitter:card" content="summary">
  
  
  
  

  <!-- feed -->
  

  
    
<link rel="stylesheet" href="/css/main.css">

  

  
    <link rel="shortcut icon" href="https://z1.ax1x.com/2023/10/05/pPXijyT.png">
  

  

  


  
</head>

<body>
  




  <div class='l_body' id='start'>
    <aside class='l_left' layout='post'>
    

  

<header class="header"><div class="logo-wrap"><a class="avatar" href="/about/"><div class="bg" style="opacity:0;background-image:url(https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/avatar/round/rainbow64@3x.webp);"></div><img no-lazy class="avatar" src="https://s1.ax1x.com/2022/11/12/ziJjfK.jpg" onerror="javascript:this.classList.add('error');this.src='https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/image/2659360.svg';"></a><a class="title" href="/"><div class="main" ff="title">愔颂</div></a></div>

<nav class="menu dis-select"><a class="nav-item active" href="/">文章</a><a class="nav-item" href="/friends/">收藏</a><a class="nav-item" href="/about/">关于</a></nav>
</header>


<div class="widgets">
<widget class="widget-wrapper search"><div class="widget-body"><div class="search-wrapper" id="search"><form class="search-form"><input type="text" class="search-input" id="search-input" data-filter="/blog/" placeholder="文章搜索"><svg t="1670596976048" class="icon search-icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2676" width="200" height="200"><path d="M938.2 832.6L723.8 618.1c-2.5-2.5-5.3-4.4-7.9-6.4 36.2-55.6 57.3-121.8 57.3-193.1C773.3 222.8 614.6 64 418.7 64S64 222.8 64 418.6c0 195.9 158.8 354.6 354.6 354.6 71.3 0 137.5-21.2 193.2-57.4 2 2.7 3.9 5.4 6.3 7.8L832.5 938c14.6 14.6 33.7 21.9 52.8 21.9 19.1 0 38.2-7.3 52.8-21.8 29.2-29.1 29.2-76.4 0.1-105.5M418.7 661.3C284.9 661.3 176 552.4 176 418.6 176 284.9 284.9 176 418.7 176c133.8 0 242.6 108.9 242.6 242.7 0 133.7-108.9 242.6-242.6 242.6" p-id="2677"></path></svg></form><div id="search-result"></div><div class="search-no-result">没有找到内容！</div></div></div></widget>



<widget class="widget-wrapper recent"><div class="widget-header cap theme dis-select"><span class="name">最近更新</span></div><div class="widget-body related-posts fs14"><a class="item title" href="/2023/10/07/LeetCode%E7%AE%97%E6%B3%95%E5%88%B7%E9%A2%98%E5%BD%95/"><span class="title">LeetCode算法刷题录</span></a><a class="item title" href="/2023/10/09/%E9%9D%A2%E8%AF%95%E9%A2%98%E7%B2%BE%E9%80%89%EF%BC%88%E4%BA%8C%EF%BC%89/"><span class="title">面试题精选（二）</span></a><a class="item title" href="/2023/10/06/%E9%9D%A2%E8%AF%95%E9%A2%98%E7%B2%BE%E9%80%89%EF%BC%88%E4%B8%80%EF%BC%89/"><span class="title">面试题精选（一）</span></a><a class="item title" href="/2023/10/28/%E7%9C%8B%E8%A7%81%E6%B5%B7/"><span class="title">看见海</span></a><a class="item title" href="/2023/10/28/%E5%9B%AD%E6%9E%97%E4%B8%8E%E8%8D%89%E6%9C%A8%E6%BA%AF%E6%B8%B8/"><span class="title">园林与草木溯游</span></a></div></widget>





</div>


    </aside>
    <div class='l_main'>
      

      



<div class="bread-nav fs12"><div id="breadcrumb"><a class="cap breadcrumb" href="/">主页</a><span class="sep"></span><a class="cap breadcrumb" href="/">文章</a><span class="sep"></span><a class="cap breadcrumb-link" href="/categories/%E8%AF%97%E6%AD%8C%E6%89%8B%E8%AE%B0/">诗歌手记</a></div><div id="post-meta">发布于&nbsp;<time datetime="2022-05-12T12:35:14.000Z">2022-05-12</time></div></div>

<article class='md-text content post'>
<h1 class="article-title"><span>读《琅嬛文集》录</span></h1>
<p>近来读张岱《琅嬛文集》，遇见许多赏心悦目的文字，摘录此篇分享给大家。</p>
<span id="more"></span>



<p>故知世间山川、云物、水火、草木、色声、香味，莫不有冰雪之气；其所以恣人挹取受用之不尽者，莫深于诗文。</p>
<p>山之有空翠，气之有沆瀣，月之有烟霜，竹之有苍蒨，食味之有生鲜，古铜之有青绿，玉石之有胞浆，诗之有冰雪，皆是物也。苏长公曰：“子由近作《栖贤僧堂记》，读之惨凉，觉崩崖飞瀑，逼人寒栗。”噫！此岂可与俗人道哉！笔墨之中，崖瀑何从来哉！</p>
<p>​                                            ——一卷冰雪文序</p>
<br>

<p>余幼遵大父教，不读朱注。凡看经书，未尝敢以各家注疏横据胸中。正襟危坐，朗诵白文数十余过，其意义忽然有省。间有不能强解者，无意无义，贮之胸中。或一年，或二年，或读他书，或听人议论，或见山川云物鸟兽虫鱼，触目惊心，忽于此书有悟，取而出之，名曰《四书遇》。盖“遇”之云者，谓不于其家，不于其寓，直于途次之中邂逅遇之也。古人见道旁蛇斗而悟草书，见公孙大娘舞剑器而笔法大进，盖真有以遇之也。古人精思静悟，钻研已久，而石火电光，忽然灼露，其机神摄合，政不知从何处着想也。举子十年攻苦于风檐寸晷之中，构成七艺，而主司以醉梦之余，忽然相投，如磁引铁，如珀摄刍，相悦以解。直欲以全副精神注之，其所遇之奥窍，真有不可得而自解者矣。推而究之，色声香味触发中间无不有遇之一窍，特留以待深心明眼之人，邂逅相遇，遂成莫逆耳。</p>
<p>余遭乱离两载，东奔西走，身无长物，委弃无余。独于此书，收之箧底，不遗只字。</p>
<p>​                                               ——四书遇序</p>
<br>

<p>鸡鸣枕上，夜气方回，因想余生平：繁华靡丽，过眼皆空，五十年来，总成一梦。今当黍熟黄粱，车旋蚁穴，当作如何消受？遥思往事，忆即书之，持向佛前，一一忏悔。不次岁月，异年谱也；不分门类，别志林也。偶拈一则，如游旧径，如见故人，城郭人民，翻用自喜，真所谓痴人前不得说梦矣。</p>
<p>昔有西陵脚夫，为人担酒，失足破其瓮，念无以偿，痴坐伫想曰：“得是梦便好。”一寒士乡试中式，方赴鹿鸣宴，恍然犹忆非真，自啮其臂曰：“莫是梦否？”一梦耳，惟恐其非梦，又惟恐其是梦，其为痴人则一也。余今大梦将寤，犹事雕虫，又是一番梦呓。因叹慧业文人，名心难化，政如邯郸梦断，漏尽钟鸣，卢生遗表，犹思摹拓二王，以流传后世。则其名根一点，坚固如佛家舍利，劫火猛烈，犹烧之不失也。</p>
<p>​                                             ——陶庵梦忆序</p>
<br>

<p>周又新先生每啜茶，辄道白门闵文水。尝曰：“恨不令宗子见。”一日，文水至越，访又新先生，携茶具，急至予舍。余时在武陵不值，后归，甚懊丧。</p>
<p>戊寅余至白门。甫登岸，即往桃叶渡访文水。时日晡矣，余至文水家，文水亦他出。余坐久。余意文水一少年好事者，及至，则瞿瞿一老子，与余叙款曲，愕愕如野鹿不可接。方欲纵谈，而老子忽起曰：“余杖忘某所，去取杖。”起席竟去。余曰：“今日岂可空去？”待其返，更定矣。老子睨余曰：“客尚在耶？客尚在何为者？”余曰：“周又老尝道闵先生精饮事，愿借余沥以解渴思。”文水喜，即自起当炉，茶旋煮，速如风雨。导至一室，幽窗净几，荆溪壶及成宣窑瓷瓯十余具，皆精绝。余问老子曰：“此茶何产？”老子曰：“阆苑茶也。”余再啜之，曰：“莫绐余，是阆苑制法而味不似。”老子昵笑曰：“客知是何产？”余再啜之，曰：“何其似罗嵑甚也？”老子吐舌曰：“奇！奇！”余问水曰：“何水？”老子曰：“惠水。”余又曰：“莫绐余，惠水至此千里，岂有水之圭角毫芒不动，生磊若是乎？”老子曰：“不复敢隐。舍间取水，必俟惠山人静夜分涸其井，淘洗数次，至黎明，涓流初满，载以大瓮，藉以文石。舟非风则勿行，水体不劳，水性不熟，故与他泉特异。”又吐舌曰：“奇奇！”言未毕，老子自去。少顷，一壶满斟余曰：“客啜此。”余曰：“香扑烈甚，味浑厚，此春茶也，向瀹者的是秋采。”老子大笑曰：“余年七十，精饮事五十余年，未尝见客之赏鉴若此之精也。五十年知己，无出客右，岂周又老谆谆向余道山阴有张宗老者，得非客乎？”余又大笑。遂相好如生平欢，饮啜无虚日。</p>
<p>​                                                ——茶史序</p>
<br>

<p>盖闻地有高人，品格与山川并重；亭遗古迹，梅花偕姓氏俱香。名流虽已代迁，胜事自须人补。在孤山逸老，高洁韵同秋水，孤清操比寒梅。疏影横斜，远映西湖清浅；暗香浮动，长陪夜月黄昏。今乃人去山空，依然水流花放。瑶葩洒雪，乱点冢上苔痕；玉树迷烟，恍堕林间鹤羽。兹来韵友，欲步先贤，补种千梅，重开孤屿。凌寒三友，蚤结九里松篁；破腊一枝，远谢六桥桃柳。[插图]想水边半树，点缀冰花；待披雪后横枝，低昂铁干。美人来自林下，高士卧于山中。白石苍厓，拟筑草亭招素鹤；浓山淡水，闲锄明月种梅花。有志竟成，无约不践。将与罗浮争艳，还期庾岭分香。实为林处士之功臣，亦是苏东坡之胜友。吾辈常劳梦想，应有宿缘。哦《曲江诗》，便见孤芳风韵；读《广平赋》，尚思铁石心肠。共策灞水之驴，且向段桥踏雪；遥期漆园之蝶，群来林墓寻梅。莫负佳期，用追芳躅。</p>
<p>​                                          ——补孤山种梅序</p>
<br>

<p>昔有一僧人与一士子同宿夜航船，士子高谈阔论，僧畏慑，卷足而寝。僧听其语有破绽，乃曰：“请问相公，澹台灭明是一个人，是两个人？”士子曰：“是两个人。”僧曰：“这等，尧舜是一个人两个人？”士子曰：“自然是一个人。”僧人乃笑曰：“这等说起来，且待小僧伸伸脚。</p>
<p>​                                             ——夜航船序</p>
<br>

<p>余生不辰，阔别西湖二十八载。然西湖无日不入吾梦中，而梦中之西湖实未尝一日别余也。前甲午、丁酉，两至西湖，如涌金门、商氏之楼外楼、祁氏之偶居、钱氏余氏之别墅，及余家之寄园一带湖庄，仅存瓦砾。则是余梦中所有者，反为西湖所无。及至断桥一望，凡昔日之歌楼舞榭，弱柳夭桃，如洪水渰没，百不存一矣。余乃急急走避，谓余为西湖而来，今所见若此，反不若保吾梦中之西湖为得计也。因想余梦与李供奉异，供奉之梦天姥也，如神女名姝，梦所未见，其梦也幻。余之梦西湖也，如家园眷属，梦所故有，其梦也真。</p>
<p>今余僦居他氏，已二十二载，梦中犹在故居。旧役小傒，今已白头，梦中仍是总角。夙习未除，故态难脱。而今而后，余但向蝶庵岑寂，蘧榻纡徐，惟吾旧梦是保，一派西湖景色，犹端然未动也。儿曹诘问，偶为言之，总是梦中说梦，非魇即呓也。余犹山中人归自海上，盛称海错之美，乡人竞来共舐其眼。嗟嗟，金齑瑶柱，过舌即空，则舐眼亦何救其馋哉？第作《梦寻》七十二则，留之后世，以作西湖之影。</p>
<p>​                                             ——西湖梦寻序</p>
<br>

<p>幸生胜地，鞋靸间饶有山川，喜作闲人，酒席间只谈风月。野航恰受，不逾两三；便榼随行，各携一二。僧上凫下，觞止茗生。谈笑杂以诙谐，陶写赖此丝竹。兴来即出，可趁樵风：日暮辄归，不因剡雪。愿邀同志，用续前游。</p>
<p>​                                            ——游山小启</p>
<br>

<p>会稽佳山水，甲于天下，而霞蔚云蒸，尤聚于山阴道上。故随足所至，皆胜地名山。王右军卜居兹土，于千岩万壑中，独取兰亭一席地。其景物风华，定当妙绝千古。且余少时见兰亭墨刻，岩峦奇峭，亭榭巍峨，曲水流觞，浴鹅涤砚。开卷视之，不禁神往。</p>
<p>​                                             ——古兰亭辩 </p>
<br>

<p>蜀人张岱，陶庵其号也。少为纨绔子弟，极爱繁华，好精舍，好美婢，好娈童，好鲜衣，好美食，好骏马，好华灯，好烟火，好梨园，好鼓吹，好古董，好花鸟，兼以茶淫橘虐，书蠹诗魔。劳碌半生，皆成梦幻。年至五十，国破家亡，避迹山居，所存者破床碎几，折鼎病琴，与残书数帙，缺砚一方而已。布衣蔬食，常至断炊。回首二十年前，真如隔世。</p>
<p>初字宗子，人称石公，即字石公。好著书，其所成者有《石匮书》《张氏家谱》《义烈传》《琅嬛文集》《明易》《大易用》《史阙》《四书遇》《梦忆》《说铃》《昌谷解》《快园道古》《傒囊十集》《西湖梦寻》《一卷冰雪文》行世。</p>
<p>生于万历丁酉八月二十五日卯时，鲁国相大涤翁之树子也。母曰陶宜人。幼多痰疾，养于外大母马太夫人者十年。外太祖云谷公宦两广，藏生牛黄丸盈数簏，自余囡地以至十有六岁，食尽之而厥疾始瘳。六岁时，大父雨若翁携余之武林，遇眉公先生跨一角鹿，为钱唐游客，对大父曰：“闻文孙善属对，吾面试之”，指屏上李白骑鲸图曰：“太白骑鲸，采石江边捞夜月。”余应曰：“眉公跨鹿，钱唐县里打秋风。”眉公大笑起跃曰：“那得灵隽若此，吾小友也。”欲进余以千秋之业，岂料余之一事无成也哉？</p>
<p>甲申以后，悠悠忽忽，既不能觅死，又不能聊生，白发婆娑，犹视息人世。恐一旦溘先朝露，与草木同腐，因思古人如王无功、陶靖节、徐文长皆自作墓铭，余亦效颦为之。甫构思，觉人与文俱不佳，辍笔者再。虽然，第言吾之癖错，则亦可传也已。曾营生圹于项王里之鸡头山，友人李研斋题其圹曰：“呜呼，有明著述鸿儒陶庵张长公之圹。”伯鸾高士，冢近要离，余故有取于项里也。明年，年跻七十，死与葬，其日月尚不知也，故不书。</p>
<p>铭曰：穷石崇，斗金谷。盲卞和，献荆玉。老廉颇，战涿鹿。赝龙门，开史局。馋东坡，饿孤竹。五羖大夫，焉肯自鬻。空学陶潜，枉希梅福。必也寻三外野人，方晓我之衷曲。</p>
<p>​                                            ——自为墓志铭</p>
<br>

<p>昔日东坡思栗里，良穗怀新，写尽澄心纸。今见平畴如绿绮，翻来白浪潮头起。野老豚蹄心更侈，篝满瓯窭，奢愿还无已。处处军输如吸髓，敢云畎亩忘庚癸。</p>
<p>​                                               ——平畴麦浪</p>
<br>

<p>何必微萤量数斛，遇夜嬉游，囊火燃山谷。怎比渔灯千万簇，星星炤出田畴绿。疑是天河成反覆，遍野疏星，连住招摇宿。此际神槎乘博陆，支机石冷空杼柚。</p>
<p>​                                              ——孤村渔火</p>
<br>

<p>雪巘晴光如缺列，闪烁凝晴，入眼翻成瞥。一幅鹅绫无缁涅，条条水道如轨辙。山入秋湖皆小垤，滋蔓难图，迢递如瓜瓞。余到洛伽心胆裂，银狮蹴起潮头雪。</p>
<p>​                                              ——三山霁雪</p>





</article>

<div class="related-wrap reveal" id="read-next"><section class="body"><div class="item" id="prev"><div class="note">较新文章</div><a href="/2022/06/12/%E6%9C%A8%E5%BF%83%E8%AF%97%E4%BA%8C%E4%B8%89%E5%8F%A5/">木心诗二三句</a></div><div class="item" id="next"><div class="note">较早文章</div><a href="/2022/04/07/%E5%8F%A4%E4%BA%BA%E8%AF%8D%E6%8A%84/">古人词抄</a></div></section></div>






  <div class='related-wrap md-text reveal' id="comments">
    <section class='header cmt-title cap theme'>
      快来参与讨论吧
    </section>
    <section class='body cmt-body giscus'>
      

<svg class="loading" style="vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2709"><path d="M832 512c0-176-144-320-320-320V128c211.2 0 384 172.8 384 384h-64zM192 512c0 176 144 320 320 320v64C300.8 896 128 723.2 128 512h64z" p-id="2710"></path></svg>

<div id="giscus" data-repo="echoalways/giscus" data-repo-id="R_kgDOKjJRiQ" data-category="Announcements" data-category-id="DIC_kwDOKjJRic4CaUxu" data-mapping="pathname" data-strict="0" data-reactions-enabled="1" data-emit-metadata="0" data-input-position="top" data-theme="preferred_color_scheme" data-lang="zh-CN" data-loading="lazy" crossorigin="anonymous"></div>

    </section>
  </div>



      
<footer class="page-footer reveal fs12"><hr><div class="text" style="text-align:center;"><p>云无心以出岫@远岫♥</p>
<div><span id="timeDate">载入天数...</span><span id="times">载入时分秒...</span>，<span id="busuanzi_container_site_pv">总访问量: <span id="busuanzi_value_site_pv"></span>次</span>，<span id="busuanzi_container_site_uv">访客数: <span id="busuanzi_value_site_uv"></span>人</span></div></div></footer>

<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<script>
  function createtime() {
    var now = new Date();
    var grt= new Date("10/03/2023 18:40:00");
    now.setTime(now.getTime()+250);
    days = (now - grt ) / 1000 / 60 / 60 / 24; dnum = Math.floor(days);
    hours = (now - grt ) / 1000 / 60 / 60 - (24 * dnum); hnum = Math.floor(hours);
    if(String(hnum).length ==1 ){hnum = "0" + hnum;} minutes = (now - grt ) / 1000 /60 - (24 * 60 * dnum) - (60 * hnum);
    mnum = Math.floor(minutes); if(String(mnum).length ==1 ){mnum = "0" + mnum;}
    seconds = (now - grt ) / 1000 - (24 * 60 * 60 * dnum) - (60 * 60 * hnum) - (60 * mnum);
    snum = Math.round(seconds); if(String(snum).length ==1 ){snum = "0" + snum;}
    document.getElementById("timeDate").innerHTML = "本站已运行 "+dnum+" 天 ";
    document.getElementById("times").innerHTML = hnum + " 小时 " + mnum + " 分 " + snum + " 秒";
  };
  setInterval("createtime()",250);
</script>

      <div class='float-panel mobile-only blur' style='display:none'>
  <button type='button' class='sidebar-toggle mobile' onclick='sidebar.toggle()'>
    <svg class="icon" style="width: 1em; height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="15301"><path d="M566.407 808.3c26.9-0.1 49.3-20.8 51.6-47.6-1.9-27.7-23.9-49.7-51.6-51.6h-412.6c-28.2-1.4-52.6 19.5-55.5 47.6 2.3 26.8 24.6 47.5 51.6 47.6h416.5v4z m309.3-249.9c26.9-0.1 49.3-20.8 51.6-47.6-2.2-26.8-24.6-47.5-51.6-47.6h-721.9c-27.7-2.8-52.5 17.4-55.3 45.1-0.1 0.8-0.1 1.7-0.2 2.5 0.9 27.2 23.6 48.5 50.7 47.6H875.707z m-103.1-245.9c26.9-0.1 49.3-20.8 51.6-47.6-0.4-28.3-23.2-51.1-51.5-51.6h-618.9c-29.5-1.1-54.3 21.9-55.5 51.4v0.2c1.4 27.8 25.2 49.2 53 47.8 0.8 0 1.7-0.1 2.5-0.2h618.8z" p-id="15302"></path><path d="M566.407 808.3c26.9-0.1 49.3-20.8 51.6-47.6-1.9-27.7-23.9-49.7-51.6-51.6h-412.6c-28.2-1.4-52.6 19.5-55.5 47.6 1.9 27.7 23.9 49.7 51.6 51.6h416.5z m309.3-249.9c26.9-0.1 49.3-20.8 51.6-47.6-2.2-26.8-24.6-47.5-51.6-47.6h-721.9c-27.7-2.8-52.5 17.4-55.3 45.1-0.1 0.8-0.1 1.7-0.2 2.5 0.9 27.2 23.6 48.5 50.7 47.6H875.707z m-103.1-245.9c26.9-0.1 49.3-20.8 51.6-47.6-0.4-28.3-23.2-51.1-51.5-51.6h-618.9c-29.5-1.1-54.3 21.9-55.5 51.4v0.2c1.4 27.8 25.2 49.2 53 47.8 0.8 0 1.7-0.1 2.5-0.2h618.8z" p-id="15303"></path></svg>
  </button>
</div>

    </div>
  </div>
  <div class='scripts'>
    <script type="text/javascript">
  const stellar = {
    // 懒加载 css https://github.com/filamentgroup/loadCSS
    loadCSS: (href, before, media, attributes) => {
      var doc = window.document;
      var ss = doc.createElement("link");
      var ref;
      if (before) {
        ref = before;
      } else {
        var refs = (doc.body || doc.getElementsByTagName("head")[0]).childNodes;
        ref = refs[refs.length - 1];
      }
      var sheets = doc.styleSheets;
      if (attributes) {
        for (var attributeName in attributes) {
          if (attributes.hasOwnProperty(attributeName)) {
            ss.setAttribute(attributeName, attributes[attributeName]);
          }
        }
      }
      ss.rel = "stylesheet";
      ss.href = href;
      ss.media = "only x";
      function ready(cb) {
        if (doc.body) {
          return cb();
        }
        setTimeout(function () {
          ready(cb);
        });
      }
      ready(function () {
        ref.parentNode.insertBefore(ss, before ? ref : ref.nextSibling);
      });
      var onloadcssdefined = function (cb) {
        var resolvedHref = ss.href;
        var i = sheets.length;
        while (i--) {
          if (sheets[i].href === resolvedHref) {
            return cb();
          }
        }
        setTimeout(function () {
          onloadcssdefined(cb);
        });
      };
      function loadCB() {
        if (ss.addEventListener) {
          ss.removeEventListener("load", loadCB);
        }
        ss.media = media || "all";
      }
      if (ss.addEventListener) {
        ss.addEventListener("load", loadCB);
      }
      ss.onloadcssdefined = onloadcssdefined;
      onloadcssdefined(loadCB);
      return ss;
    },

    // 从 butterfly 和 volantis 获得灵感
    loadScript: (src, opt) => new Promise((resolve, reject) => {
      var script = document.createElement('script');
      if (src.startsWith('/')){
        src = stellar.config.root + src.substring(1);
      }
      script.src = src;
      if (opt) {
        for (let key of Object.keys(opt)) {
          script[key] = opt[key]
        }
      } else {
        // 默认异步，如果需要同步，第二个参数传入 {} 即可
        script.async = true
      }
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    }),

    // https://github.com/jerryc127/hexo-theme-butterfly
    jQuery: (fn) => {
      if (typeof jQuery === 'undefined') {
        stellar.loadScript(stellar.plugins.jQuery).then(fn)
      } else {
        fn()
      }
    }
  };
  stellar.version = '1.19.0';
  stellar.github = 'https://github.com/xaoxuu/hexo-theme-stellar/tree/1.19.0';
  stellar.config = {
    date_suffix: {
      just: '刚刚',
      min: '分钟前',
      hour: '小时前',
      day: '天前',
      month: '个月前',
    },
    root : '/',
  };

  // required plugins (only load if needs)
  stellar.plugins = {
    jQuery: 'https://gcore.jsdelivr.net/npm/jquery@3.6.2/dist/jquery.min.js'
  };

  if ('local_search') {
    stellar.search = {};
    stellar.search.service = 'local_search';
    if (stellar.search.service == 'local_search') {
      let service_obj = Object.assign({}, {"field":"all","path":"/search.json","content":true,"sort":"-date"});
      stellar.search[stellar.search.service] = service_obj;
    }
  }

  // stellar js
  stellar.plugins.stellar = Object.assign({"sites":"/js/plugins/sites.js","friends":"/js/plugins/friends.js","ghinfo":"/js/plugins/ghinfo.js","timeline":"/js/plugins/timeline.js","linkcard":"/js/plugins/linkcard.js","fcircle":"/js/plugins/fcircle.js","weibo":"/js/plugins/weibo.js"});

  stellar.plugins.marked = Object.assign("https://cdn.bootcdn.net/ajax/libs/marked/4.0.18/marked.min.js");
  // optional plugins
  if ('false' == 'true') {
    stellar.plugins.lazyload = Object.assign({"enable":false,"js":"https://gcore.jsdelivr.net/npm/vanilla-lazyload@17.8.3/dist/lazyload.min.js","transition":"blur"});
  }
  if ('true' == 'true') {
    stellar.plugins.swiper = Object.assign({"enable":true,"css":"https://unpkg.com/swiper@8.4.5/swiper-bundle.min.css","js":"https://unpkg.com/swiper@8.4.5/swiper-bundle.min.js"});
  }
  if ('' == 'true') {
    stellar.plugins.scrollreveal = Object.assign({"enable":null,"js":"https://gcore.jsdelivr.net/npm/scrollreveal@4.0.9/dist/scrollreveal.min.js","distance":"8px","duration":500,"interval":100,"scale":1});
  }
  if ('true' == 'true') {
    stellar.plugins.preload = Object.assign({"enable":true,"service":"flying_pages","instant_page":"https://gcore.jsdelivr.net/gh/volantis-x/cdn-volantis@4.1.2/js/instant_page.js","flying_pages":"https://gcore.jsdelivr.net/gh/gijo-varghese/flying-pages@2.1.2/flying-pages.min.js"});
  }
  if ('true' == 'true') {
    stellar.plugins.fancybox = Object.assign({"enable":true,"js":"https://gcore.jsdelivr.net/npm/@fancyapps/ui@4.0/dist/fancybox.umd.js","css":"https://gcore.jsdelivr.net/npm/@fancyapps/ui@4.0/dist/fancybox.css","selector":".swiper-slide img"});
  }
  if ('false' == 'true') {
    stellar.plugins.heti = Object.assign({"enable":false,"css":"https://unpkg.com/heti@0.9.2/umd/heti.min.css","js":"https://unpkg.com/heti@0.9.2/umd/heti-addon.min.js"});
  }
  if ('true' == 'true') {
    stellar.plugins.copycode = Object.assign({"enable":true,"js":"/js/plugins/copycode.js","default_text":"Copy","success_text":"Copied"});
  }
</script>

<!-- required -->

  
<script src="/js/main.js" async></script>



<!-- optional -->

  <script>
  function loadJS() {
    const els = document.querySelectorAll("#comments #giscus");
    if (els.length === 0) return;
    els.forEach((el, i) => {
      try {
        el.innerHTML = '';
      } catch (error) {
        console.log(error);
      }
      var script = document.createElement('script');
      script.src = 'https://giscus.app/client.js';
      script.async = true;
      for (let key of Object.keys(el.attributes)) {
        let attr = el.attributes[key];
        if (['class', 'id'].includes(attr.name) === false) {
          script.setAttribute(attr.name, attr.value);
        }
      }
      el.appendChild(script);
    });
  }
  window.addEventListener('DOMContentLoaded', (event) => {
    loadJS();
  });
</script>




<!-- inject -->


  </div>
</body>
</html>
